package main

import (
	"bigStudy/router"
	"log"
	"os"
)

func init() {
	// 日志输出到文件
	logFile, err := os.OpenFile("./log.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
	if err != nil {
		logFile, _ = os.Create("./log.log")
		return
	}
	log.SetOutput(logFile)
	log.SetFlags(log.Ldate | log.Ltime | log.Lshortfile | log.Ldate)
}

func main() {
	// 开启路由
	router.Router()
}
